set tempname=#path#name-conv.epub
#newl "#ppthapps\pandoc\pandoc.exe" |--program file--
-o "%tempname%" |--output--
--metadata=title:"#name" |--title--
"#item" |-input-
#newl "#ppthapps\kindlegen\kindlegen.exe" |-program file-
"%tempname%" |-input-
-o "#name.mobi" |-output-
#newl del "%tempname%" |

<comment>
Convert opf/htm/html/epub/zip to mobi, using kindlegen.
Epub file must have 'title' set or the conversion will fail.
-
This script first creates temporary epub file using Pandoc, which is then converted to mobi, using Kindlegen.
docx==(pandoc)=>epub==(kindlegen)==>mobi.
